package com.mazaiting.mybatisplus.encrypt.encryptor;

import org.jasypt.util.text.TextEncryptor;

/**
 * PBE标准加密处理器
 *
 * @author danghailiang
 */
public class StrongTextEncryptor extends CachedTextEncryptor {

    /**
     * jasypt 加密器
     * @param key 签名
     * @return 返回加密器
     */
    @Override
    protected TextEncryptor createTextEncryptor(String key) {
        org.jasypt.util.text.StrongTextEncryptor encryptor = new org.jasypt.util.text.StrongTextEncryptor();
        encryptor.setPassword(key);
        return encryptor;
    }
}
